import { getMenuList} from '@/api/sys/menu/menu' 
export default {
  state: {
     menuList: [],
  }, mutations: {
    setMenuList (state, menuList) {
      state.menuList = menuList
    }
  },
  actions: {
    getMenuList ({ state, commit }) {
      return new Promise((resolve, reject) => {
        try {
          getMenuList({}).then(res => {
             var temp=res;
            commit('setMenuList', temp.map())
            resolve()
          }).catch(err => {
            reject(err)
          })
        } catch (error) {
          reject(error)
        }

       
      })
    },
    }
}
